import Vue from 'vue'

import Cookies from 'js-cookie'

import Element from 'element-ui'
// import C10yUtil from 'c10y-util'
import './assets/styles/element-variables.scss'

import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import App from './App'
import store from './store'
import router from './router'
// import directive from './directive' // directive
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
import BaiduMap from 'vue-baidu-map'
Vue.use(BaiduMap, {
  ak: 'xc76V8ddYmWQvw1aQtt2cBUgbV3HmQIH'
})
import './assets/icons' // icon
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
import '@/utils/drawer/drawer-drag.js'

// 引用Echarts
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
import dayjs from 'dayjs'
Vue.prototype.$dayjs = dayjs


// 全局方法挂载
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree

// 全局组件挂载

// Vue.use(C10yUtil, { request: request, env: env })
// Vue.use(directive)
Vue.use(plugins)

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */

Vue.use(Element, {
  size: Cookies.get('size') || 'medium' // set element-ui default size
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
